{include file="public/header" /}
<body>
<div class="x-body layui-anim">
    <form class="layui-form" id="form" action="{:url('save')}">
        {include file="public/arguments" /}
        <input type="hidden" name="id" value="{$Request.param.id}">
        <input type="hidden" name="pid" value="{$Request.param.pid|default=0}">
        {if $p_title }
        <div class="layui-form-item">
            <label class="layui-form-label">上级分类</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" value="{$p_title}" disabled="disabled"/>
            </div>
        </div>
        {/if}
        <div class="layui-form-item">
            <label class="layui-form-label">分类名称</label>
            <div class="layui-input-inline">
                <input type="text" name="title" placeholder="请输入分类名称" lay-verify="required" lay-reqtext="请输入分类名称" lay-verType="tips"
                       class="layui-input" value="{$info?$info.title:''}"/>
            </div>
        </div>
        {include file="form/items/img" type='' /}
<!--        <div class="layui-form-item uploadImageBox">-->
<!--            <label class="layui-form-label">图标</label>-->

<!--            <div class="layui-input-block">-->
<!--                <div class="layui-tab-item layui-show" style="width: 260px;">-->
<!--                    <div class="layui-upload-drag uploadImage">-->
<!--                        <i class="layui-icon"></i>-->
<!--                        <p>点击上传，或将文件拖拽到此处</p>-->
<!--                        <div>-->
<!--                            <hr>-->
<!--                            <img src="{$info?$info.icon:''}"  class="layui-upload-img showImage" alt="上传成功后渲染" style="max-width: 50%">-->
<!--                            <input type="hidden" name="icon" value="{$info?$info.icon:''}" class="inpImage"  lay-verify="required" lay-reqtext="请上传图标" />-->
<!--                        </div>-->
<!--                    </div><input class="layui-upload-file" type="file" accept="" name="file">-->
<!--                </div>-->

<!--            </div>-->
<!--        </div>-->
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-inline">
                <input type="text" name="sort" autocomplete="off" lay-verify="required" lay-reqtext="请填写排序" lay-verType="tips"
                       placeholder="请输入排序，越小越靠前" class="layui-input"
                       value="{$info?$info.sort:''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <button class="layui-btn" lay-filter="save" lay-submit formObj="#form">
                保存
            </button>
        </div>
    </form>
</div>
</body>
{include file="public/footer" /}
<script type="text/javascript" src="/static/admin/form/material.js"></script>
</html>